Small cleanup. (#305539, Paolo Borelli)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 9 Jun 2005 18:36:58 +0000 (18:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 9 Jun 2005 18:36:58 +0000 (18:36 +0000)
2005-06-09  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small
cleanup.  (#305539, Paolo Borelli)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktextbtree.c

index dfc8cd22164f70d9f25496bb27fd899ddbc6aea5..3f95430561c3cce9de2d7560e0642de5e02a8ace 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small 
+       cleanup.  (#305539, Paolo Borelli)
+
 2005-06-09  Rodrigo Moya <rodrigo@novell.com>
 
        * configure.in: added cairo to list of $GTK_PACKAGES.
index dfc8cd22164f70d9f25496bb27fd899ddbc6aea5..3f95430561c3cce9de2d7560e0642de5e02a8ace 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small 
+       cleanup.  (#305539, Paolo Borelli)
+
 2005-06-09  Rodrigo Moya <rodrigo@novell.com>
 
        * configure.in: added cairo to list of $GTK_PACKAGES.
index dfc8cd22164f70d9f25496bb27fd899ddbc6aea5..3f95430561c3cce9de2d7560e0642de5e02a8ace 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small 
+       cleanup.  (#305539, Paolo Borelli)
+
 2005-06-09  Rodrigo Moya <rodrigo@novell.com>
 
        * configure.in: added cairo to list of $GTK_PACKAGES.
index 050399e5f30cc3314ee247d72fa2d775f11216ec..5ebfcf80dc3334ae461f373b0adbca067d7531b1 100644 (file)
@@ -2434,7 +2434,7 @@ _gtk_text_btree_char_is_invisible (const GtkTextIter *iter)
 {
   gboolean invisible = FALSE;  /* if nobody says otherwise, it's visible */
 
-  int deftagCnts[LOTSA_TAGS];
+  int deftagCnts[LOTSA_TAGS] = { 0, };
   int *tagCnts = deftagCnts;
   GtkTextTag *deftags[LOTSA_TAGS];
   GtkTextTag **tags = deftags;
@@ -2457,15 +2457,10 @@ _gtk_text_btree_char_is_invisible (const GtkTextIter *iter)
   /* almost always avoid malloc, so stay out of system calls */
   if (LOTSA_TAGS < numTags)
     {
-      tagCnts = g_new (int, numTags);
+      tagCnts = g_new0 (int, numTags);
       tags = g_new (GtkTextTag*, numTags);
     }
 
-  for (i=0; i<numTags; i++)
-    {
-      tagCnts[i] = 0;
-    }
-
   /*
    * Record tag toggles within the line of indexPtr but preceding
    * indexPtr.